﻿#ifndef CONNECTCAMERAINTERFACE_H
#define CONNECTCAMERAINTERFACE_H

#include "CameraManager.h"
#include "DbHelper.h"
#include "QmlSignal.h"


// 和前端那边的控制接口，放这儿吧………
class ConnectCameraInterface : public QObject
{
    Q_OBJECT
private:
    ConnectCameraInterface();
public:

    static ConnectCameraInterface& I();

    // 一共三个相机 cameraIdx: 1放靶/转靶 2打靶 4纯化
    // 如果传参了，刷新数据库的内容。如果没传参，从数据库中获取相机信息
    Q_INVOKABLE void connectCamera(int cameraIdx, QString cameraType = "", QString ip = "", QString port = "", QString username = "", QString password = "");
    // 摄像头类型: 0海康 1JF

    Q_INVOKABLE QStringList getCameraInfo(int cameraIdx);           // QStringList(ip, port, username, password)

    void connectAllCamera();






};

#endif // CONNECTCAMERAINTERFACE_H
